package com.ruoyi.dynamic.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.pojo.result.Pages;
import com.ruoyi.dynamic.model.pojo.entity.RoomAuction;
import com.ruoyi.dynamic.model.pojo.request.app.AppRoomAuctionCheckRequest;
import com.ruoyi.dynamic.model.pojo.request.app.AppRoomAuctionSearchRequest;
import com.ruoyi.dynamic.model.pojo.request.app.AppRoomAuctionStartRequest;
import com.ruoyi.dynamic.model.pojo.request.app.AppRoomChumApplyRequest;
import com.ruoyi.dynamic.model.pojo.result.app.AppAuctionInfoResult;
import com.ruoyi.dynamic.model.pojo.result.app.AppRoomAuctionGiftResult;
import com.ruoyi.dynamic.model.pojo.result.app.AppRoomAuctionResult;

/**
 * <p>
 * 房间心动拍拍 服务类
 * </p>
 *
 * @author Gnc
 * @since 2024-12-24
 */
public interface IRoomAuctionService extends IService<RoomAuction> {

    /**
     * 申请拍拍
     */
    boolean applyChum(AppRoomChumApplyRequest request, Long userId);

    /**
     * 拍卖列表
     */
    Pages<AppRoomAuctionResult> listPage(AppRoomAuctionSearchRequest request, Long userId);

    /**
     * 审核拍卖列表
     */
    boolean check(AppRoomAuctionCheckRequest request, Long userId);


    /**
     * 校验房间心动拍拍
     */
    RoomAuction verify(Long id);

    /**
     * 开始拍拍
     */
    void startAuction(Long userId, AppRoomAuctionStartRequest request);


    /**
     * 拍拍结束
     */
    void over(Long id);

    /**
     * 赠送礼物查看与第一名差距
     *
     * @param userId
     * @param request
     * @return
     */
    AppRoomAuctionGiftResult lookDiff(Long userId, AppRoomAuctionStartRequest request);

    /**
     * 成功竞拍者 自动绑定关系
     */
    void successAuction(RoomAuction auction, Long userId);


    /**
     * 当前拍拍详情
     */
    AppAuctionInfoResult info(Long id, Long userId);
}
